// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-01

package setting

import (
	"context"
	"gitee.com/go-libs/result"
	"gitee.com/go-wares/framework-iris/framework/src/logics"
	"github.com/kataras/iris/v12"
)

// Logic
// 全局设置.
type Logic struct {
	response *Response
}

// New
// 创建逻辑实例.
func New() logics.Logical {
	return &Logic{
		response: NewResponse(),
	}
}

// Run
// 加载配置.
func (o *Logic) Run(_ context.Context, _ iris.Context) result.Result {
	var res = result.New()
	return res.With(o.response)
}
